The IDL_Pointer class contains static methods that are available for all IDL pointers. In addition, because IDL_Pointer is a subclass of IDL_Variable, all of the IDL_Variable methods are also available.
The IDL_Pointer::PtrType method returns the variable type of the pointer's data.
Check the type of a variable a pointer points to:
p = PTR_NEW("my data")
PRINT, p.PtrType( )
IDL prints:
7
Result = var.PtrType( )
An integer specifying the data type. If var is an array then ::PtrType returns an array of types.
None.
None.
The IDL_Pointer::Valid method returns the validity of its pointer arguments.
Check the validity of the pointer:
p = PTR_NEW(228l)
PRINT, p.Valid( )
IDL prints:
1
Result = var.Valid( )
A boolean value of 0 (false) or 1 (true).
None.
None.
|
8.4 |
Introduced |
Static Methods and Attributes, Variable Attributes, IDL_Integer, IDL_Number, IDL_String, IDL_Variable